//
//  ViewController.swift
//  在视图上实现弹起效果
//
//  Created by quanhao huang on 2019/9/28.
//  Copyright © 2019 demo. All rights reserved.
//

import UIKit
import QuartzCore

class ViewController: UIViewController {

    @IBOutlet weak var popingView: UIView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        let keyframeAnimation = CAKeyframeAnimation(keyPath: "transform.scale")
        keyframeAnimation.keyTimes = [0.0, 0.7, 1.0]
        keyframeAnimation.values = [0.0, 1.2, 1.0]
        keyframeAnimation.duration = 4
        keyframeAnimation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
        
        self.popingView.layer.add(keyframeAnimation, forKey: "pop")
    }


}

